﻿using CrystalDecisions.CrystalReports.Engine;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DSPL.Reports.ReportBase;
using DSPL.Reports.ReportBase.Stock.Transaction;


namespace DSPL.Reports.Classes.Category
{
    class StockTransactionReports:CategoryReports
    {
        public StockTransactionReports(string reportId)
        {
            this.documentId = reportId;
        }

        #region Report Category Members
        public override ReportDocument GetReportDocument(DataTable reportDataTable= null)
        {
            try
            {
                reportDoc = new ReportDocument();

                switch (documentId)
                {
                    case "rptPurchaseOrder":
                        return GetFilledReport(new rptPurchaseOrder());

                    case "rptGoodReceiveNote":
                        return GetFilledReport(new rptGoodReceiveNote());

                    case "rptGoodReceiveReturnNote":
                        return GetFilledReport(new rptGoodReceiveReturnNote());

                    case "rptQuotation":
                        return GetFilledReport(new rptQuotation());

                    case "rptSalesOrder":
                        return GetFilledReport(new rptSalesOrder());

                    case "rptInvoice":
                        return GetFilledReport(new rptInvoice());

                    case "rptDispatchNote":
                        return GetFilledReport(new rptDispatchNote());

                    case "rptSalesReturnWithInvoice":
                        return GetFilledReport(new rptSalesReturnWithInvoice());

                    case "rptSalesReturnWithoutInvoice":
                        return GetFilledReport(new rptSalesReturnWithoutInvoice());

                    case "rptInterLocStockTransfer":
                        return GetFilledReport(new rptInterLocStockTransfer());

                    case "rptDamageStockTransfer":
                        return GetFilledReport(new rptDamageStockTransfer());

                    case "rptIssueNote":
                        return GetFilledReport(new rptIssueNote());

                    case "rptIssueReturnNote":
                        return GetFilledReport(new rptIssueReturnNote());

                    case "rptAdjustmentAddition":
                        return GetFilledReport(new rptAdjustmentAddition());

                    case "rptAdjustmentDeduction":
                        return GetFilledReport(new rptAdjustmentDeduction());

                    default:
                        break;
                }
                return null;
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion
    }
}
